﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master"
    Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="DoubanApi.Models" %>
<%@ Import Namespace="ZYStudios.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    电影排片
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery.ui.core.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.ui.tabs.js" type="text/javascript"></script>
    <link href="../../Content/Playtime.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/NewMovie.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            var $tabs=$("#tabs").tabs();
            <%if(ViewData["PlayLineSelect"]!=null){ %>
            $tabs.tabs('select',<%=ViewData["PlayLineSelect"]%>);
            <%} %>

        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <% List<PlaytimeModel> PlaytimeModels = ViewData["PlayLine"] as List<PlaytimeModel>; %>
    <div class="PageContent">
        <a class="MenuTitle">电影排片</a><br />
        <br />
        <div class="Playtime">
            <div id="tabs">
                <ul>
                    <%foreach (PlaytimeModel model in PlaytimeModels)
                      { %>
                      <li><a href='<%="#"+model.ToString() %>'><%=model.PlayData %></a></li>
                    <%} %>
                </ul>

                <%foreach (PlaytimeModel model in PlaytimeModels)
                      { %>
                      <div id='<%=model.ToString() %>'>
                       <% List<PlaytimeItemModel> PlaytimeItemModels = model.Movies as List<PlaytimeItemModel>;%>
                       <span class="PlaytimeList">
                       <%foreach (PlaytimeItemModel item in PlaytimeItemModels)
                         { %>
                         <li>
                         <a href="<%=Url.Action("Movie","Movie",new {id=item.Movie.Id}) %>"><%="<img style='border:0' src='" + item.Movie.ImageLink + "' alt='' />"%></a>
                         <span class="MovieTitle"><a href="<%=Url.Action("Movie","Movie",new {id=item.Movie.Id}) %>"><%=item.MovieName %></a></span>
                         <br /><br />
                         <span>片长:</span>
                         <span><%=item.MovieDuration %></span>
                         <br />
                         <br />
                         <span class="time" ><%=item.PlayTime %></span>
                         </li>
                       <%} %>
                       </span>
                      </div>
                    <%} %>
            </div>
        </div>
    </div>
</asp:Content>
